import request from '../utils/request'
// 发送验证码
export const getCode = (data) => {
    return request.post('/get/code', data)
}

// https:/v3pz.itndedu.com/v3pz/user/authentication
// 注册用户
export const userAuthentication = (data) => {
    return request.post('/user/authentication', data)
}

// https:/v3pz.itndedu.com/v3pz/login
// 登录
export const login = (data) => {
    return request.post('/login', data)
}

// 权限管理列表  这段****
// https:/v3pz.itndedu.com/v3pz/auth/admin
export const authAdmin = (params) => {
    return request.get('/auth/admin', {params})
}

// 数型菜单，权限管理
// https:/v3pz.itndedu.com/v3pz/user/getmenu
export const userGetmenu = () => {
    return request.get('/user/getmenu')
}

// 菜单权限的修改
// https:/v3pz.itndedu.com/v3pz/user/setmenu
export const userSetmenu = (data) => {
    return request.post('/user/setmenu', data)
}

// 菜单权限列表
export const menuList = (params) => {
    return request.get('/menu/list', {params})
}

// 权限下拉列表
// menu/selectlist
export const menuSelectlist = () => {
    return request.get('menu/selectlist')
}

// 用户数据修改
export const updateUser = (data) => {
    return request.post('/update/user', data)
}

// 用户菜单权限
// menu/permissions
export const menuPermissions = () => {
    return request.get('/menu/permissions')
}

// 获取陪护师头像列表
// https:/v3pz.itndedu.com/v3pz/photo/list
export const photoList = () => {
    return request.get('/photo/list')
}

// 陪护师创建
// https:/v3pz.itndedu.com/v3pz/companion
export const companion = (data) => {
    return request.post('/companion', data)
}

// 陪护师列表
// https:/v3pz.itndedu.com/v3pz/companion/list
export const companionList = (params) => {
    return request.get('companion/list', {params})
}

// 陪护师删除
//  https:/v3pz.itndedu.com/v3pz/delete/companion
export const deleteCompanion = (data) => {
    return request.post('/delete/companion', data)
}

//订单列表
//https:/v3pz.itndedu.com/v3pz/admin/order
export const orderList = (params) => {
    return request.get('/admin/order', {params})
}

//服务状态完成
//https:/v3pz.itndedu.com/v3pz/update/order
export const orderComplete = (data) => {
    return request.post('/update/order', data)
}
